import 'package:coinbaby/common/const/cosnt.dart';
import 'package:coinbaby/common/textstyle/textstyle.dart';
import 'package:flutter/material.dart';

class HeadTypeView extends StatefulWidget {
  @override
  _HeadTypeViewState createState() => _HeadTypeViewState();
}

class _HeadTypeViewState extends State<HeadTypeView> {

  int selectIndex = 0;
  final TextStyle select = AppFont.textStyle(17, AppColor.blue, fontWeight: FontWeight.bold);
  final TextStyle normal = AppFont.textStyle(17, AppColor.fontgrey);
  @override
  Widget build(BuildContext context) {

    return Row(
      children: <Widget>[
        InkWell(
          onTap: (){
            setState(() {
              selectIndex = 0;
            });
          },
          child: Text("进取型", style: selectIndex == 0 ? select : normal,)
        ),
        SizedBox(width: 30,),
        InkWell(
          onTap: (){
            setState(() {
              selectIndex = 1;
            });
          },
          child: Text("稳健型", style: selectIndex == 1 ? select : normal,)
        ),
      ],
    );
  }
}